<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<title>{$school['title']}</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />
<link rel="stylesheet" href="{MODULE_URL}public/mobile/css/weixin.css">
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/mAlbum.css?v=5.00716" />	
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/greenStyle.css?v=5.00120" />
<script type="text/javascript" src="{MODULE_URL}public/mobile/js/jquery-1.11.3.min.js?v=4.9"></script>
</head>
<body>

	<div class="all">	
		<div id="titlebar" class="header mainColor">
			<div class="l"><a class="backOff" style="background:url({OSSURL}public/mobile/img/ic_arrow_left_48px_white.svg) no-repeat;background-size: 55% 55%;background-position: 50%;" href="javascript:history.go(-1);"></a></div>
			<div class="m"><span style="font-size: 18px">{$name}相册{$bjid}</span></div>
		</div>
		<div id="titlebar_bg" class="_header"></div>
		<div class="titleTop" >
			<div class="multiselect" >
				<div class="selectList" style="display:none">
		        	<div class="double" id="classList">
						<ul>
							{if $teachers['status'] == 1}
							{if !empty($teacher['bj_id1'])}<li onclick="isSelect(this);">
								<span name="checkName" class="le">{$name1}</span>
								<span class="ri"><img alt="check" src="{OSSURL}/public/mobile/img/check.png" /></span>
								<input type=hidden name="check" value="{$bjid1}"/>
							</li>{/if}
								{if !empty($teacher['bj_id2'])}<li onclick="isSelect(this);">
								<span name="checkName" class="le">{$name2}</span>
								<span class="ri"><img alt="check" src="{OSSURL}/public/mobile/img/check.png" /></span>
								<input type=hidden name="check" value="{$bjid2}"/>
							</li>{/if}
								{if !empty($teacher['bj_id3'])}<li onclick="isSelect(this);">
								<span name="checkName" class="le">{$name3}</span>
								<span class="ri"><img alt="check" src="{OSSURL}/public/mobile/img/check.png" /></span>
								<input type=hidden name="check" value="{$bjid3}"/>
							</li>{/if}
							{else}
							{loop $bjlist $row}
								<li onclick="isSelect(this);">
								<span name="checkName" class="le">{$row['sname']}</span>
								<span class="ri"><img alt="check" src="{OSSURL}/public/mobile/img/check.png" /></span>
								<input type=hidden name="check" value="{$row['sid']}"/>
							{/loop}
							{/if}
						</ul>
						<div class="btnBox">
							<div class="btn">
								<div class="box"><span class="ok" onclick="saveChecked(\'classList\');">确认</span></div>
								<div class="box"><span onclick="closeBox();">取消</span></div>
							</div>
						</div>						
					</div>
				</div>	
				<div id="query_classId" class="sendParam sendParam_wot pr" onclick="showSelectBox('classList')">
					<i class="icon-funnel"></i>
					<span class="sendSelectParamOperBtn pa address f15 c9" closestatus="0" id="classListShow">{if !empty($bj_id)}{$category[$bj_id]['sname']}{else if !empty($teacher['bj_id1'])}{$name1}{else}{/if}</span>
					<input id="classListValue" name="classListValue" type="hidden" {if !empty($_GPC['bj_id'])}value="{$_GPC['bj_id']}"{else if !empty($teacher['bj_id1'])}value="{$bjid1}"{else}{/if}/>
					<span class="sendParamOperBtn pa address f15 c9" closestatus="0"><i class="iconloc fx_icon_background-position float_left"></i></span>
				</div>
			</div>			
			<div class="addBtn" >
				<button onclick="up();" class="mainColor btn-default ">上传</a>
			</div>
			<div class="cl"></div>
		</div>	
		<div id="albumList" class="albumList" style="padding-bottom:70px;">
			<div class="albumBox albumBox-left">
				<a href="{php echo $this->createMobileUrl('xc', array('schoolid' => $schoolid, 'bj_id' => $bj_id, 'type' => '0'), true)}">
					<div class="albumCover div-imgMask">
						<img class="img-adaptive" {if !empty($frist['picurl'])}src="{php echo tomedia($frist['picurl'])}"{/if}>
					</div>
					<div class="bg-dark"></div>
					<div class="bg-tint"></div>
					<div class="ablumBottom" ><span class="ablumName">班级圈</span><span class="ablumTotal">{if !empty($frist['picurl'])}({$total}张){else}(0张){/if}</span></div>
				</a>
			</div>
			<div class="albumBox albumBox-right">
				<a href="{php echo $this->createMobileUrl('xc', array('schoolid' => $schoolid, 'bj_id' => $bj_id, 'type' => '2'), true)}">
					<div class="albumCover div-imgMask">
						<img class="img-adaptive" {if !empty($cfrist['picurl'])}src="{php echo tomedia($cfrist['picurl'])}"{/if}>
					</div>
					<div class="bg-dark"></div>
					<div class="bg-tint"></div>
					<div class="ablumBottom" ><span class="ablumName">公共相册</span><span class="ablumTotal">{if !empty($cfrist['picurl'])}({$ctotal}张){else}(0张){/if}</span></div>
				</a>
			</div>			
		</div>
	</div>
	<div class="blackBg"></div>
</body>
<input type="hidden" id="basicParameters" value="{php echo $this->createMobileUrl('xc', array('schoolid' => $schoolid), true)}" />
<script type="text/javascript" src="{OSSURL}public/mobile/js/PromptBoxUtil.js?v=5.00311"></script>
<script type="text/javascript" src="{OSSURL}public/mobile/js/datetimeUtil.min.js?v=5.00311"></script>
<script>
	var sxclisturl = '{php echo  $this->createMobileUrl('xclist', array('schoolid' => $schoolid, 'getalist' => 1, 'bj_id' => $bj_id))}';
	var PB = new PromptBox();
	var dateTimesUtil = new dateTime();
	//var JsonsUtil = new JsonUtil();
	function up() {
	window.location.href = "{php echo $this->createMobileUrl('xcfb', array('schoolid' => $schoolid), true)}";
	}
var oss = "http://weimeizhan.oss-cn-shenzhen.aliyuncs.com";	

function showSelectBox(obj){
	if($("#"+obj).find("ul").children().length > 0){
		$(".selectList").css("display","block");
		$(".blackBg").css("display","block");
		$("#"+obj).css("display","block");
		var height = 0;
		$(".selectList").css("margin-top",-$("#"+obj).parent().height()/2);	
		$("#"+obj).css("height",$(".selectList").height());
		$("#"+obj).find("ul").css("height",$(".selectList").height()-50);
	}
}

function closeBox(){
	$(".selectList").css("display","none");
	$(".blackBg").css("display","none");
	$(".single").css("display","none");
	$(".double").css("display","none");
	$(".double").css("height","auto");
	$(".double").find("ul").css("height","auto");
}

function isSelect(obj){
	$(obj).parent().children().removeAttr("class");
	$(obj).parent().find("span[class=le]").attr("name","selectName");
	$(obj).parent().find("input[type=hidden]").attr("name","select");
	$(obj).attr("class","selected");
	$(obj).find("span[class=le]").attr("name","selectedName");
	$(obj).find("input[type=hidden]").attr("name","selected");
	var boxName = $(obj).parent().parent().attr("id");
	var selectedName = $(obj).find("span[class=le][name=selectedName]");
	var selectedValue = $(obj).find("input[type=hidden][name=selected]");
	$("#className").html(selectedName.html());
	$("#classListValue").val(selectedValue.val());
	closeBox();
	var bjid = $("#classListValue").val();
	PB.prompt("数据载入中，请等待~","forever");
	location.href = "{php echo $this->createMobileUrl('xclist', array('schoolid' => $schoolid), true)}"+ '&bj_id=' + bjid;
}	
</script>
<script type="text/javascript" src="{OSSURL}public/mobile/js/smAlbum.js?v=5.0"></script>
{php include $this->template('newfooter');}
</html>